package gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

@SuppressWarnings("serial")
public class MainWindow extends JFrame {
	private static MainWindow main;
	
	public MainWindow(){
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setTitle("Projekt - Dinamikus Rendszerek");
		setSize(500, 500);
		
		Switcher listener = new Switcher();
		JMenuBar jmb = new JMenuBar();
			JMenu menu = new JMenu("Menu");
				JMenuItem exit = new JMenuItem("Exit");
				exit.addActionListener(new ActionListener(){
					public void actionPerformed(ActionEvent arg) {
						System.exit(0);
					}
				});
			menu.add(exit);
		jmb.add(menu);
			JMenu games = new JMenu("Games");
		jmb.add(games);
			JMenu settings = new JMenu("Settings");
		jmb.add(settings);
			JMenu about = new JMenu("About");
		jmb.add(about);
		setJMenuBar(jmb);
		
		setLocationRelativeTo(null);
		setVisible(true);
	}
	
	private class Switcher implements ActionListener {
		public void actionPerformed(ActionEvent arg) {
//			main.setContentPane(new Game());
		}
	}
	
	public static void main(String argv[]){
		main = new MainWindow();
	}
}
